# ADOBE CONFIDENTIAL
# Copyright (c) 2015 Adobe Systems Incorporated. All rights reserved.
# NOTICE:  All information contained herein is, and remains
# the property of Adobe Systems Incorporated and its suppliers,
# if any.  The intellectual and technical concepts contained
# herein are proprietary to Adobe Systems Incorporated and its
# suppliers and are protected by trade secret or copyright law.
# Dissemination of this information or reproduction of this material
# is strictly forbidden unless prior written permission is obtained
# from Adobe Systems Incorporated.


gemPath = File.join(File.dirname(__FILE__), "../rubygems")
Gem.paths = {
    'GEM_HOME' => gemPath,
    'GEM_PATH' => gemPath
}
Gem::Specification.dirs << gemPath

require 'rubygems'

version = ">= 0"

if ARGV.first
  str = ARGV.first
  str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding
  if str =~ /\A_(.*)_\z/ and Gem::Version.correct?($1) then
    version = $1
    ARGV.shift
  end
end

if Gem.respond_to?(:activate_bin_path)
load Gem.activate_bin_path('sass', 'sass', version)
else
gem "sass", version
load Gem.bin_path("sass", "sass", version)
end
